package com.camp.android.trip.n.track.trip;


import android.app.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.camp.android.trip.n.track.DatabaseManager;
import com.camp.android.trip.n.track.NewTripActivity;
import com.camp.android.trip.n.track.R;
import com.camp.android.trip.n.track.Trip;


public class TripItineraryFragment extends ListFragment {

	  private ItineraryListAdapter adapter = null;
	  private int trip_id; 
	  
	    public TripItineraryFragment(int trip_id) {
	    	this.trip_id = trip_id;
	    }

	    @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        Log.i("TripItFrag","Created itinerary fragment with tripid = " + trip_id);
	    }

	    @Override
	    public View onCreateView(LayoutInflater inflater, ViewGroup container,
	            Bundle savedInstanceState) {
	        View rootView = inflater.inflate(R.layout.fragment_trip_itinerary, container, false);
	        Log.i("tag","itinerary fragment view created");
	        
	        adapter = new ItineraryListAdapter(inflater,getActivity());
	        return rootView;
	    }
	    
	   
	    
	    @Override
	    public void onActivityCreated(Bundle savedInstanceState) {
	    	// TODO Auto-generated method stub
	    	super.onActivityCreated(savedInstanceState); 
	    	Log.i("TAG","ManuUpcomingFragment onActivityCreated");
	    	//ListAdapter adapter = new UpcomingListAdapter(getActivity());
	    	setListAdapter(adapter);
//	        getListView().setAdapter(adapter);
	    }

		
	    
}